#region

using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.InterceptionExtension;

#endregion

namespace SmartInspect.Extensions.Unity
{
    /// <summary>
    ///     This is an implementation for an sessio-attribute which functionallity isnt implemented now. This is maybe used in future for adding support for some session
    ///     assignment per instance of a class to get a clearer logging.
    /// </summary>
    public class SiSessionAttribute : HandlerAttribute
    {
        public SiSessionAttribute()
        {
            Order = 1;
        }

        private string SessionName { get; set; }
        private SessionPolicy SessionPolicy { get; set; }

        public override ICallHandler CreateHandler(IUnityContainer container)
        {
            return new SiSessionHandler
            {
                SessionName = SessionName,
                SessionPolicy = SessionPolicy,
                Order = base.Order
            };
        }
    }
}